package com.jwt.sys.controller;

import com.jwt.sys.domain.Test;
import com.jwt.sys.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("test")
public class testController {

    @Autowired
    private TestService testService;

    @RequestMapping("/hello")
    private String hello(){
        return "hello";
    }

    @GetMapping("/test")
    public List<Test> list(){
        return testService.list();
    }
}
